*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
* Diehl/Wolter: “ATTITUDES ABOUT CONTAINMENT MEASURES DURING
*                THE 2020/2021 CORONAVIRUS PANDEMIC: 
*                SELF-INTEREST, OR BROADER POLITICAL ORIENTATIONS?"
*
* Do-File for robustness checks of regression analysis
*
* This version: 20210415
*
* Author: Felix Wolter, felix.wolter@uni-konstanz.de
*
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


*Final full models, figure 3 and table S4 (supplement)
reg zopenindex c.idtecon i.incloss c.idtfamily i.childrenathome  ///
   i.riskgroup01 i.old ///
   c.sttecon c.sttfamily ///
   c.doubtstate c.protransfer ib2.leftrightcat ///
   i.east  ///   
   c.gentrust ///
   i.female c.educyr ///
   c.kr_inz_rate10 c.kr_tod_rate10 ///
   [iweight=persweight] if time==0

estimates store May
ereturn list

reg zopenindex c.idtecon i.incloss c.idtfamily i.childrenathome  ///
   i.riskgroup01 i.old ///
   c.sttecon c.sttfamily ///
   c.doubtstate c.protransfer ib2.leftrightcat ///
   i.east  ///   
   c.gentrust ///
   i.female c.educyr ///
   c.kr_inz_rate10 c.kr_tod_rate10 ///
   [iweight=persweight] if time==1
   
estimates store November
ereturn list

suest May November, vce(cluster id)

coefplot (May, msymb(o) mcolor(blue) ciopts(lcolor(blue)) drop(_cons) ) ///
    (November, msymb(t) mcolor(red*1.2) ciopts(lcolor(red*1.2)) drop(_cons) ) , ///
	xline(0, lwidth(medthin) lcolor(black)) ///
    headings(idtecon = "{bf:Individual threat:}" ///
	         sttecon = "{bf:Sociotropic threat:}" ///
			 doubtstate = "{bf:Political orientations:}" ///
			 1.east = "{bf:Control variables:}" ///
			 , labsize(2.5)) ///
	coeflabels(idtfamily = "Family situation" ///
	           1.childrenathome = "Children in household" ///
			   idtecon = "Economic situation" ///
			   1.incloss = "Income loss in pandemic" ///
			   1.riskgroup01 = "Covid-19 at-risk group" ///
			   badhealth = "Bad health" ///
			   1.old = "Age >70" ///
			   sttfamily = "Family situation" ///
			   sttecon = "Economic situation" ///
			   doubtstate = "Distrust in institutions" ///
			   protransfer = "Pro redistribution" ///
			   1.leftrightcat = "Pol. ideol.: left-wing" ///
			   3.leftrightcat = "Pol. ideol.: right-wing" ///
			   4.leftrightcat = "Pol. ideol.: missing" ///
			   gentrust = "General trust" ///
			   1.east = "East Germany" ///
			   1.female = "Gender female" ///
			   educyr = "Education (years)" ///
			   kr_inz_rate10 = "Infections in last 7 days/10K pop." ///
			   kr_tod_rate10 = "Cumulated deaths/10K pop." ///
			   , labsize(2.5)) ///
	xlabel(-.4(.1).4, labsize(2.2)) ylabel(, labsize(2.5)) ///
	graphregion(fcolor(gs15)) ///
    plotlabels("May survey" "November survey") ///
    xtitle("Effect on opposition to containments", size(2.5)) legend( size(vsmall)) ///
	ysize(15) xsize(10)




